-- ----------------------------- 2023-06-27 add by gaozq--------------begin

-- 建表语句
CREATE TABLE T_LIMS_PERSON_WORK_EXPERIENCE( 
    ID NUMBER NOT NULL,
    PERSONID NUMBER NULL,
    STARTTIME DATE NULL,
    ENDTIME DATE NULL,
    WORKUNIT VARCHAR2(100)  NULL,
    DEPARTMENT VARCHAR2(100)  NULL,
    POSITION VARCHAR2(100)  NULL,
    MAJORJOB VARCHAR2(200)  NULL,
    CREATEDBYID VARCHAR2(36)  NULL,
    CREATEDBYNAME VARCHAR2(60)  NULL,
    CREATEDTIME DATE NULL,
    CREATEDBYORGID VARCHAR2(36)  NULL,
    CREATEDBYORGNAME VARCHAR2(270)  NULL,
    REMARK VARCHAR2(300)  NULL
 );
COMMENT ON TABLE T_LIMS_PERSON_WORK_EXPERIENCE IS '人员工作经历表';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.ID IS '主键';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.PERSONID IS '人员ID';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.STARTTIME IS '开始时间';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.ENDTIME IS '结束时间';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.WORKUNIT IS '工作单位';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.DEPARTMENT IS '工作部门';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.POSITION IS '职务';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.MAJORJOB IS '工作内容';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDBYID IS '制单人编码';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDBYNAME IS '制单人名称';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDTIME IS '制单时间';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDBYORGID IS '制单人单位编码';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDBYORGNAME IS '制单人单位名称';
COMMENT ON COLUMN T_LIMS_PERSON_WORK_EXPERIENCE.REMARK IS '备注';

 -- WARNING NAME PK_LIMS_PERSON_WORK_EXPERIENCE TOO LONG FOR ORACLE VERSION < 12.2 

ALTER TABLE T_LIMS_PERSON_WORK_EXPERIENCE ADD CONSTRAINT PK_LIMS_PERSON_WORK_EXPERIENCE PRIMARY KEY (ID);

-- 旧版审计跟踪，跟踪配置变更语句

INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','ID','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','PERSONID','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','STARTTIME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','ENDTIME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','WORKUNIT','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','DEPARTMENT','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','POSITION','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','MAJORJOB','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDBYID','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDBYNAME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDTIME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDBYORGID','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDBYORGNAME','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
INSERT INTO T_CORE_AT_CONFIG_LINE (ID,CONFIGID,COLUMNID,AUDITTRAIL,CREATEDBYID,CREATEDBYNAME,CREATEDTIME,CREATEDBYORGID,CREATEDBYORGNAME) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','REMARK','1','gaozq','高志强', CURRENT_TIMESTAMP,'L005','五行业');
COMMIT;

INSERT INTO T_CORE_AT_CONFIG (ID, AUDITTRAIL, CREATEDBYID, CREATEDBYNAME, CREATEDTIME, CREATEDBYORGID, CREATEDBYORGNAME)
VALUES ('T_LIMS_PERSON_WORK_EXPERIENCE', '1', 'gaozq', '高志强', CURRENT_TIMESTAMP, 'L005', '五行业');

-- 审计跟踪V2，跟踪配置变更语句

INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','ID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','PERSONID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','STARTTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','ENDTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','WORKUNIT','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','DEPARTMENT','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','POSITION','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','MAJORJOB','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDBYID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDBYNAME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDTIME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDBYORGID','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','CREATEDBYORGNAME','1');
INSERT INTO T_CORE_AUDIT_CONFIG_COLUMN (ID,CONFIGID,"COLUMN",AUDITABLE) VALUES (SEQ_CORE.NEXTVAL,'T_LIMS_PERSON_WORK_EXPERIENCE','REMARK','1');
COMMIT;

INSERT INTO T_CORE_AUDIT_CONFIG (ID, NAME, CATEGORY, AUDITABLE)
VALUES ('T_LIMS_PERSON_WORK_EXPERIENCE', '人员工作经历表', 'service', '1');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.SERVICE_NAME', '人员工作经历表', '人员工作经历表', 'zh-CN', '人员工作经历表');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.ID', '人员工作经历表的主键', '主键', 'zh-CN', '主键');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.PERSONID', '人员工作经历表的人员ID', '人员ID', 'zh-CN', '人员ID');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.STARTTIME', '人员工作经历表的开始时间', '开始时间', 'zh-CN', '开始时间');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.ENDTIME', '人员工作经历表的结束时间', '结束时间', 'zh-CN', '结束时间');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.WORKUNIT', '人员工作经历表的工作单位', '工作单位', 'zh-CN', '工作单位');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.DEPARTMENT', '人员工作经历表的工作部门', '工作部门', 'zh-CN', '工作部门');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.POSITION', '人员工作经历表的职务', '职务', 'zh-CN', '职务');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.MAJORJOB', '人员工作经历表的工作内容', '工作内容', 'zh-CN', '工作内容');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDBYID', '人员工作经历表的制单人编码', '制单人编码', 'zh-CN', '制单人编码');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDBYNAME', '人员工作经历表的制单人名称', '制单人名称', 'zh-CN', '制单人名称');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDTIME', '人员工作经历表的制单时间', '制单时间', 'zh-CN', '制单时间');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDBYORGID', '人员工作经历表的制单人单位编码', '制单人单位编码', 'zh-CN', '制单人单位编码');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.CREATEDBYORGNAME', '人员工作经历表的制单人单位名称', '制单人单位名称', 'zh-CN', '制单人单位名称');
CALL INSERTI18N('T_LIMS_PERSON_WORK_EXPERIENCE.REMARK', '人员工作经历表的备注', '备注', 'zh-CN', '备注');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.WORKEXPERIENCES.MODAL.ADD', '新增', '新增', 'zh-CN', '新增');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.WORKEXPERIENCES.TAB.BASE_INFO', '基本信息', '基本信息', 'zh-CN', '基本信息');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.WORKEXPERIENCES.BUTTON.BUTTON', '按钮', '按钮', 'zh-CN', '按钮');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.WORKEXPERIENCES.TIP.TIP', '提示框', '提示框', 'zh-CN', '提示框');
CALL INSERTI18N('BASEMODULE.RM.PERSONS.WORKEXPERIENCES.MODAL.MODAL', '对话框', '对话框', 'zh-CN', '对话框');

-- 创建菜单语句
INSERT INTO T_CORE_MENU (ID, MENUNAME, HREF, PARENTID, ORDERNO, ICON, MENUINITNAME)
VALUES ('workexperience', '工作经历', '/secure/basemodule/rm/persons/person-work-experiences/page/edit-list', 'null', 'workexperience', 'null', '工作经历');

INSERT INTO T_CORE_TABLE (ID, AUDITABLE, ATTACHMENT)
VALUES ('T_LIMS_PERSON_WORK_EXPERIENCE', '0', '0');


COMMIT;

-- ----------------------------- 2023-06-27 add by gaozq------------end